/**
* Copyright (c) 2022 Beijing Jiaotong University
* PhotLab is licensed under [Open Source License].
* You can use this software according to the terms and conditions of the [Open Source License].
* You may obtain a copy of [Open Source License] at: [https://open.source.license/]
* 
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* 
* See the [Open Source License] for more details.
* 
* Author: Zhenjie Wei
* Created: Mar. 23, 2023
* Supported by: National Key Research and Development Program of China
*/

@mixin phot-system-content-message {
    flex-shrink: 0;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    .pui-drawer {
        border-radius: 0;
        &.show {
            // height: 0px;
        }
        .pui-drawer_container {
            height: 100%;
            .pui-drawer_toolbar {
                .drawer-header {
                    width: 100%;
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    box-sizing: border-box;
                    padding: 4px 0;
                    ._left {
                        display: flex;
                        justify-content: space-between;
                        align-items: center;
                        .title {
                            font-size: 14px;
                            font-weight: bold;
                            margin-right: 20px;
                            color: $text_light;
                        }
                        .pui-selector {
                            .pui-selector_text {
                                min-height: 0px !important;
                                height: 24px !important;
                                min-width: 73px !important;
                                .pui-icon {
                                    font-size: 12px;
                                }
                            }
                        }
                    }
                    ._right {
                        .pui-icon {
                            font-size: 20px;
                            margin-right: 10px;
                            &:first-child {
                                margin-right: 15px;
                            }
                            &:hover {
                                color: $text-sub_light;
                            }
                        }
                    }
                }
            }
            .pui-drawer_content {
                padding: 0;
                box-sizing: border-box;
                .drawer-content {
                    height: 100%;
                    width: 100%;
                    box-sizing: border-box;
                    padding: 10px;
                    overflow: auto;
                    .message-list {
                        width: 100%;
                        .message-item {
                            font-size: 12px;
                            &:not(:first-child) {
                                margin-top: 10px;
                            }
                            &.warn {
                                color: $warning;
                            }
                            &.error {
                                color: $danger;
                            }
                            &.success {
                                color: $success;
                            }
                        }
                    }
                }
            }
        }
    }
}

@mixin phot-system-content-message-dark {
    .pui-drawer {
        .pui-drawer_container {
            .pui-drawer_toolbar {
                .drawer-header {
                    ._left {
                        .title {
                            color: $text_dark;
                        }
                    }
                    ._right {
                        .pui-icon {
                            &:first-child {
                            }
                            &:hover {
                                color: $text-sub_dark;
                            }
                        }
                    }
                }
            }
        }
    }
}
